package com.hex.ds.hdrs.log.controller;

import com.hex.bigdata.hbda.base.Page;
import com.hex.ds.hdrs.common.page.PageData;
import com.hex.ds.hdrs.log.po.SmsSendLog;
import com.hex.ds.hdrs.log.service.SmsSendLogService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/api/smsSendLog")
public class SmsSendLogController {

    @Autowired
    private SmsSendLogService smsSendLogService;

    @ApiOperation("信息发送日志分页查询")
    @GetMapping("/selectPages")
    public ResponseEntity<Object> selectPages(SmsSendLog smsSendLog, Page page) {
        log.info("【进入了SmsSendLogController的selectPages方法】smsSendLog={}", smsSendLog);
        PageData pageData = new PageData(this.smsSendLogService.selectPages(smsSendLog, page), page);
        return new ResponseEntity(pageData, HttpStatus.OK);
    }
}
